package com.javasm.mb_store_api_final.giftsandgoods.goodsType.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.javasm.mb_store_api_final.giftsandgoods.goodsType.entity.GgGoodsType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 商品管理-商品类型表(GgGoodsType)表数据库访问层
 *
 * @author makejava
 * @since 2024-07-30 10:39:15
 */
public interface GgGoodsTypeDao extends BaseMapper<GgGoodsType> {
    @Select("select * from gg_goods_type where type_name = #{voTypeName}")
    GgGoodsType getByTypeName(String voTypeName);
    @Insert("INSERT into gg_goodstype_brand" +
            " VALUES(#{ggGoodsType.rowId},#{BRANDID})")
    Boolean insertBrandNameById(GgGoodsType ggGoodsType);
    @Insert("INSERT into gg_goodstype_brand VALUES(#{typeId},#{brandId})")
    Boolean insertBrandIdByTypeId(@Param("typeId") Integer typeId, @Param("brandId") Integer brandId);
}

